package org.example.DesignPatterns.Composite;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 13:19
 **/
public class Client {
    public static void main(String[] args) throws Exception {
        Node driveD=new Folder("D://");

        Node doc=new Folder("Documents");
        doc.add(new File("a.txt"));
        doc.add(new File("b.java"));
        driveD.add(doc);
        Node music=new Folder("music");
        Node Lisze=new Folder("Lisze");
        Lisze.add(new File("Un_Sospiro.mp3"));
        Lisze.add(new File("Lisbestraum_No.3"));
        music.add(Lisze);
        driveD.add(music);

        driveD.tree(0);
    }
}